Page({

 
  returnTap:function(){
      wx.navigateTo({
      url: '../index/index',
    }) 
  },
  enterTap:function(){
    if(this.data.degree>5||this.data.degree<1){
      wx.showModal({
        title: 'attention',
        content: '输入的难易程度不在范围内',
      })
    }
    else if(this.data.number>10||this.data.number<1){
      wx.showModal({
        title: 'attention',
        content: '输入的题目数量不在范围内',
      })
    }
    else{
      wx.navigateTo({
        url: '../list/list',
        success: function(res) {},
        fail: function(res) {},
        complete: function(res) {},
      })
    }
    
    
  },
  GetDegree:function(e){
     this.setData({
     degree:e.detail.value
   })
     var Degree = getApp()
     Degree.getDegree = this.data.degree
  },
  GetNumber:function(e){
     this.setData({
     number:e.detail.value
     })
     var Number =getApp()
     Number.getNumber = this.data.number
  },
})